Method for Managing Graphics Lines

ABSTRACT

The field of the invention is that of graphics libraries supplying graphics functions used in the tracing of symbolic images. For certain applications, the screen comprises restricted areas, referred to as ‘clipboxes’, inside which no graphics objects must be traced. The method according to the invention allows elementary straight lines to be generated on a matrix display comprising restricted areas without filling the frame-buffer with segments of the straight line belonging to said restricted areas. The method comprises a first step for calculating the segments of the line situated strictly within the allowed area and a second step for tracing said segments in the allowed area.

The field of the invention is that of graphics libraries supplyinggraphics functions used in the tracing of symbolic images. One of thefields where the invention is particularly applicable is the generationof symbolic images for aircraft flight control. These images are notablyused in navigation, flight control and the management of criticalsystems, such as engine monitoring.

Graphical images are generated on matrix display screens, such as forexample liquid crystal displays. The generation of the graphics image iseffected in the following manner: a buffer memory, referred to as‘frame-buffer’, is filled with the various graphics symbols required bythe image, these graphics symbols being assigned an order of priority;when all the graphics symbols have been created in the frame-buffer, itscontents are then sent to the display. These graphics images aregenerated in real time.

In certain applications, the screen comprises restricted areas, called‘clipboxes’, inside which no graphics object must be traced. Thisfunction is useful, for example, for displaying one or more video imagesthat it is undesirable to clutter with graphics symbols.

In order to achieve this function, the solution usually adopted consistsin assigning the highest priority order to the restricted areas in sucha manner that the areas with graphics symbols of lower priority fallingwithin the restricted areas are erased from the frame-buffer. In thisscenario, graphics symbols may be created needlessly within theframe-buffer only to then be replaced with the desired content of theclipbox. Thus, unnecessary calculations are performed, and since theimages are generated in real time and contain a very large number ofpixels, the calculation and addressing times need to be optimized.

The object of the invention is to avoid filling the frame-buffer severaltimes successively in the restricted areas by eliminating by calculationthe graphics symbols falling in the restricted areas.

Any curve or any complex line may be decomposed into a certain number ofelementary straight lines. The invention is applied to these elementarystraight lines.

More precisely, the subject of the invention is a method for graphicalgeneration of at least one straight line on a matrix display comprisingat least one restricted area and one allowed area complementary to therestricted area, characterized in that said method comprises a firststep for calculating the segments of the line situated strictly withinthe allowed area and a second step for tracing said segments in theallowed area.

Advantageously, when the display comprises two separate restrictedareas, the method comprises the following sub-steps:

-   -   Calculation of the points of intersection between the line and        the first restricted area;    -   Calculation of the first segments of the line situated outside        of the first restricted area;    -   Calculation of the points of intersection between each of the        first segments and the second restricted area when there exists        at least one first segment outside of the first restricted area;    -   Calculation of the second segments of the line situated outside        of the first restricted area and outside of the second        restricted area;    -   Tracing of said second segments in the allowed area, when there        exists at least one second segment outside of the first        restricted area and outside of the second restricted area.

Advantageously, the ends of each segment are either an end of the line,or a point of intersection of the line with one of the restricted areas.

Advantageously, the restricted areas or the allowed areas arerectangular areas and the algorithm allowing the points of intersectionto be calculated is of the Cohen-Sutherland or Cyrus-Beck type.

The invention will be better understood and other advantages will becomeapparent upon reading the description that follows, presented as anon-limiting example and with regard to the appended figures, amongwhich:

FIG. 1 shows a matrix display comprising one restricted area and oneline situated outside of the restricted area;

FIG. 2 shows a matrix display comprising one restricted area and oneline situated within the restricted area;

FIG. 3 shows a matrix display comprising one restricted area and oneline situated partially within the restricted area;

FIG. 4 shows a matrix display comprising one restricted area and oneline running across the restricted area;

FIGS. 5 a and 5 b show a matrix display comprising two restricted areasand one line running across both restricted areas;

FIG. 6 shows the principle of the algorithm allowing the points ofintersection between a line and a rectangular restricted area to becalculated.

The subject of the invention is a graphical generation method comprisinga first step for calculating the segments of the line situated strictlywithin the allowed area and a second step for tracing said segments inthe allowed area.

FIGS. 1, 2, 3 and 4 illustrate this method in the case where thereexists only one restricted area 2 symbolized by a rectangle on thedisplay 1 and in the various possible configurations of lines 4.

In FIG. 1, the line 4 is completely outside of the restricted area 2. Ithas no point of intersection with the restricted area 2. After the firstcalculation step, the line is retained in its entirety, which issymbolized by a solid line. All the points of the line are traced.

In FIG. 2, the line 4 is completely within the restricted area 2. It hasno point of intersection with the restricted area 2. After the firstcalculation step, the line is entirely eliminated, which is symbolizedby a dashed line. No points of the line are traced.

In FIG. 3, one of the ends 6 of the line is within the restricted areaand the other end 5 is within the allowed area 3. In this case, the linehas a point of intersection 51 with the restricted area. The segment 41,which is within the restricted area 2 and whose ends are the points 6and 51, is eliminated, symbolized by a dashed line. The segment 42,which is within the allowed area 3 and whose ends are the points 5 and51, is retained, symbolized by a solid line. All the points of thissegment are traced.

In FIG. 4, the two ends of the line are within the allowed area but theline cuts the restricted area at the points 51 and 52. The segment 42,which is within the restricted area 2 and whose ends are the points 51and 52, is eliminated, symbolized by a dashed line. The segments 41 and43, which are within the allowed area 3 and whose ends are,respectively, the points 5 and 51 and 52 and 6 are retained, symbolizedby solid lines. All the points of these segments are traced.

When the display comprises two separate restricted areas, the methodcomprises the following sub-steps:

-   -   Calculation of the points of intersection between the line and        the first restricted area;    -   Calculation of the first segments of the line situated outside        of the first restricted area;    -   Calculation of the points of intersection between each of the        first segments and the second restricted area when there exists        at least one first segment outside of the first restricted area;    -   Calculation of the second segments of the line situated outside        of the first restricted area and outside of the second        restricted area;    -   Tracing of said second segments within the allowed area, when        there exists at least one second segment outside of the first        restricted area and outside of the second restricted area.

FIGS. 5 a and 5 b illustrate the main steps of the method in the case oftwo separate restricted areas 21 and 22 disposed on a display 1. A line4 crosses the two restricted areas 21 and 22.

FIG. 5 a shows the first two sub-steps of the method. In this figure, asa reminder, the second area 22 appears as dashes. In FIG. 5 a, the twoends 5 and 6 of the line are within the allowed area but the line cutsthe restricted area at the points 51 and 52. The segment 42, which iswithin the restricted area 21 and whose ends are the points 51 and 52,is eliminated, symbolized by a dashed line. The segments 41 and 43,which are within the allowed area 3 and whose ends are, respectively,the points 5 and 51 and 52 and 6 are retained, symbolized by solidlines.

FIG. 5 b shows the last two sub-steps of the method. The first segment41, which is outside of the restricted area 22, is retained in itsentirety. The two ends 52 and 6 of the segment 43 are within the allowedarea but this segment cuts the restricted area 22 at the points 53 and54. The segment 45, which is within the restricted area 22 and whoseends are the points 53 and 54, is eliminated, symbolized by a dashedline. The segments 44 and 46, which are within the allowed area 3 andwhose ends are, respectively, the points 52 and 53 and 54 and 6 areretained, symbolized by solid lines. Finally, the segments 41, 44 and 46are traced as indicated in FIG. 5 b.

It goes without saying that this method can be generalized to aplurality of restricted areas. Accordingly, the line segments situatedoutside of the areas already examined are examined area by area.

In the vast majority of cases, the allowed areas or the restricted areasare rectangular windows into which video images are inserted. Varioustypes of algorithms exist for calculating the points of intersection. Byway of example, the Cohen-Sutherland algorithm can be used (ComputerGraphics: Principles and Practice—Second Edition—Foley, vanDam, Feinerand Hugues—§ 3.1.2). The main steps of this algorithm are the following:

-   -   Step 1: Division of the display area into 8 allowed areas        surrounding the rectangular restricted area 2 as indicated in        FIG. 6. These areas are bounded by 4 lines situated along the        extensions of the sides of the rectangle bounding the restricted        area 2. Eight areas, numbered from 31 to 38 in FIG. 6, are thus        obtained;    -   Step 2: Determination of the area to which the ends 5 and 6 of a        line belong, by comparing the coordinates of the ends of the        lines with those of the areas;    -   Step 3: Depending on the result of Step 2, there are 3 possible        cases:        -   The line belongs to the restricted area and it is            eliminated;        -   The line is entirely outside of the line and it is retained            in its entirety;        -   The line partially crosses the restricted area and the next            step is performed;    -   Step 4: Calculation of a first point of intersection between the        line and one side of the rectangle crossed by the line;    -   Step 5: For each segment bounded by one end of the line and the        point of intersection, taking said segment as equivalent to a        line, step 3 is repeated until all the segments obtained belong        to either the restricted area, or to the allowed area.

1-6. (canceled)
 7. A method for graphical generation of at least onestraight line on a matrix display connected to a frame-buffer, thedisplay having a restricted area and one allowed area complementary tothe restricted area, that said method comprising the steps of:calculating the segments of the line situated strictly within theallowed area; and a tracing the segments in the allowed area, theframe-buffer being filled only once per generated graphics image.
 8. Themethod for graphical generation as claimed in claim 7, comprising thefollowing sub-steps, when the display comprises two separate restrictedareas: calculation of the points of intersection between the line andthe first restricted area; calculation of the first segments of the linesituated outside of the first restricted area; calculation of the pointsof intersection between each of the first segments and the secondrestricted area when there exists at least one first segment outside ofthe first restricted area; calculation of the second segments of theline situated outside of the first restricted area and outside of thesecond restricted area; tracing of said second segments in the allowedarea, when there exists at least one second segment outside of the firstrestricted area and outside of the second restricted area.
 9. The methodfor graphical generation as claimed in claim 8, wherein the ends of eachsegment are either an end of the line, or a point of intersection of theline with one of the restricted areas.
 10. The method for graphicalgeneration as claimed in claim 7, wherein the restricted areas arerectangular areas.
 11. The method for graphical generation as claimed inclaim 7, wherein the allowed areas are rectangular areas.
 12. The methodfor graphical generation as claimed in claim 7, wherein the algorithmallowing the points of intersection to be calculated is of theCohen-Sutherland or Cyrus-Beck type.